#include<iostream>
#include<thread>
#include<mutex>
#include<future>
#include<condition_variable>

int task7_1(int a, int b) {
	int ret_a = a * a;
	int ret_b = b * 2;

	return ret_a + ret_b;
}

int main()
{
	std::future<int> fu = std::async(std::launch::async, task7_1, 1, 2);

	std::cout << "return value is" << fu.get()<<endl;


	std::packaged_task<int(int, int)> t(task7_1);
	t(1, 2);
	std::cout << t.get_future().get();
}